import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element'

import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

import axios from 'axios'
// 导入全局样式表
import './assets/css/global.css'
axios.defaults.baseURL = 'http://172.18.41.44:9999/';
// axios.defaults.baseURL = 'http://192.168.43.224:9999/';
// 192.168.43.224
// 172.18.41.73

axios.interceptors.request.use(config => {
  NProgress.start();
  return config;
})

axios.interceptors.response.use(config => {
  NProgress.done();
  return config;
})



Vue.prototype.$axios = axios;
Vue.prototype.$url = "172.18.41.46:9999";
Vue.config.productionTip = false

// 设置请求拦截
// axios.interceptors.request.use(
//   config => {
//     //config.data = JSON.stringify(config.data);  
//     config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
//     // config.headers['Content-Type'] = 'application/form-data;charset=UTF-8';
//     return config;
//   },
//   error => {
//     return Promise.reject(error.response);
//   });


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')